import i18n from '@src/locales';
import FormSubServiceItemSetting from './FormSubServiceItemSetting.vue';
import FormSubServiceItemPreview from './FormSubServiceItemPreview.vue';
import FormSubServiceItem from './FormSubServiceItem.vue';
import FormSubServiceItemView from './FormSubServiceItemView.vue';
// 服务项目关联字段
import FormServiceItemRelatedFieldsBuild from './FormServiceItemRelatedFieldsBuild.vue';

// 服务项目子表单
let FormSubServiceItemField = {
  formType: 'subServiceItem', // 字段类型
  fieldName: 'subServiceItem',
  name: i18n.t('common.form.type.serviceIterm'),
  previewIcon: 'icon-fuwuxiangmu',
  isSystem: 1,
  forceDelete: true,
  subFormFieldList: () => {
    return []
  },
  isSubForm: true,
  component: {
    preview: FormSubServiceItemPreview,
    build: FormSubServiceItem,
    view: FormSubServiceItemView,
    setting: FormSubServiceItemSetting,
  }
};
const FormServiceItem = {
  formType: 'serviceItemRelatedFields',
  name: i18n.t('common.form.type.relateServiceItem'),
  component: {
    build: FormServiceItemRelatedFieldsBuild
  }
}
export default [FormSubServiceItemField, FormServiceItem];
